package com.example.mobile2021606129ly0615;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyDateAdapter {
    private MySQLiteOpenHelper openHelper;
    private SQLiteDatabase database;
    public void openDB(Context context){
        openHelper=new MySQLiteOpenHelper(context,"student.db",null,1);
        try {
            database=openHelper.getWritableDatabase();
        }catch (Exception e){
            database=openHelper.getReadableDatabase();
        }

    }
    public void closeDB(){
        database.close();
        database=null
    }

}
